﻿@model SDE_FIC.Models.Usuario

@{
    ViewBag.Title = "Novo Usuário";
    Layout = "~/Views/Shared/_Layout_Sistema.cshtml";
}

<h2>Criar Novo</h2>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>Usuário</legend>

        <div class="editor-label">
            <b>Perfil</b>
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(model => model.Perfil, new SelectList(
                  new List<Object>{ 
                                   new { value = "professor" , text = "Professor"  },
                                   new { value = "coordenador" , text = "Coordenador" },                                   
                                  },"value","text"))
            @Html.ValidationMessageFor(model => model.Perfil)
        </div>

        <div class="editor-label">
            <b>Usuário</b>
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Username)
            @Html.ValidationMessageFor(model => model.Username)
        </div>

        <div class="editor-label">
            <b>Senha</b>
        </div>
        <div class="editor-field">
            @Html.PasswordFor(model => model.Password)
            @Html.ValidationMessageFor(model => model.Password)
        </div>

        <div class="editor-label">
            <b>Nome Completo</b>
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.NomeCompleto)
            @Html.ValidationMessageFor(model => model.NomeCompleto)
        </div>

        <p>
            <input type="submit" class="btn btn-sucsess " value="Salvar" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Voltar para Listagem", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
